package com.lidong.zc.databasemodel.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 表唯一索引：一张表有多个唯一索引
 *
 * @author LiDong
 * @version 1.0.0
 * @createTime 9/9/2022 8:40 AM
 */
// This annotation is used to Class
@Target(ElementType.TYPE)
// When  run is  effective
@Retention(RetentionPolicy.RUNTIME)
// Java document annotation
@Documented
public @interface TableUniqueKey {

    /**
     * 唯一索引的列
     * {"id_uk:id","id_name_uk:id,name"}
     *
     * @return String[]
     */
    String[] columns() default {};

}
